/*
 * p4427.cpp
 *
 *  Created on: 2013-10-30
 *      Author: zy
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
const int mod = 1000000007;
int gcd(int a, int b)
{
	return b == 0 ? a : gcd(b, a % b);
}
int lcm(int a, int b)
{
	return a * b / gcd(a, b);
}
int dp[2][1001][1001];
int p[1001], idx[1001], cnt;
int LCM[1001][1001];
int n, m, K;
void init()
{
	for (int i = 1; i <= 1000; i++)
		for (int j = 1; j <= 1000; j++)
			LCM[i][j] = lcm(i, j);
}
void pre()
{
	memset(idx, 0, sizeof(idx));
	cnt = 0;
	for (int i = 1; i <= m; i++)
		if (m % i == 0)
		{
			p[++cnt] = i;
			idx[i] = cnt;
		}
}
int main()
{
	init();
	while (scanf("%d%d%d", &n, &m, &K) != EOF)
	{
		pre();
		memset(dp, 0, sizeof(dp));
		for (int j = 1; j <= cnt; j++)
			dp[1][p[j]][j] = 1;
		int now = 1;
		for (int i = 1; i < K; i++)
		{
			for (int j = 1; j <= n; j++)
				for (int k = 1; k <= cnt; k++)
					dp[1 - now][j][k] = 0;
			for (int j = 1; j <= n; j++)
				for (int k = 1; k <= cnt; k++)
				{
					if (dp[now][j][k] == 0)
						continue;
					for (int a = 1; a <= cnt; a++)
					{
						if (j + p[a] > n)
							continue;
						dp[1 - now][j + p[a]][idx[LCM[p[k]][p[a]]]] = (dp[1
								- now][j + p[a]][idx[LCM[p[k]][p[a]]]]
								+ dp[now][j][k]) % mod;
					}
				}
			now = 1 - now;

		}
		printf("%d\n", dp[now][n][cnt]);
	}
	return 0;
}
